<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>

<script>
$(document).ready(function(){
	setTimeout('reloadNum()', 5000);
});

function reloadNum() {
	$.getJSON('getOrdinal.action', {}, function(data) {
		for (i in data.listCurNum) {
			$("#num").html(data.listCurNum[i]);
		}
		for (i in data.listRegisterNum) {
			$("#lastnum").html(data.listRegisterNum[i]);
		}
	});
}
</script>
</head>
<body>
<div id="content">
<h1>So thu tu hien tai:</h1>
<h2 id="num"><s:property value="curnum" /></h2>
<h2>So thu tu cuoi cung da dang ky:</h2>
<h2 id="lastnum"><s:property value="lastRegisterNum" /></h2>
<div>so thu tu </div>
<div><a href="showRegisterOrdinal.action">Lay so thu tu</a></div>
</div>
</body>
</html>
